home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / ixemul-complete / man / cat2 / unlink.0 < prev    next >
Text File  |  1996-09-01  |  3KB  |  70 lines

  1.  
  2. UNLINK(2)                  UNIX Programmer's Manual                  UNLINK(2)
  3.  
  4. NNAAMMEE
  5.      uunnlliinnkk - remove directory entry
  6.  
  7. SSYYNNOOPPSSIISS
  8.      ##iinncclluuddee <<uunniissttdd..hh>>
  9.  
  10.      _i_n_t
  11.      uunnlliinnkk(_c_o_n_s_t _c_h_a_r _*_p_a_t_h)
  12.  
  13. DDEESSCCRRIIPPTTIIOONN
  14.      The uunnlliinnkk() function removes the link named by _p_a_t_h from its directory
  15.      and decrements the link count of the file which was referenced by the
  16.      link.  If that decrement reduces the link count of the file to zero, and
  17.      no process has the file open, then all resources associated with the file
  18.      are reclaimed.  If one or more process have the file open when the last
  19.      link is removed, the link is removed, but the removal of the file is de-
  20.      layed until all references to it have been closed.
  21.  
  22. RREETTUURRNN VVAALLUUEESS
  23.      Upon successful completion, a value of 0 is returned.  Otherwise, a value
  24.      of -1 is returned and _e_r_r_n_o is set to indicate the error.
  25.  
  26. EERRRROORRSS
  27.      The uunnlliinnkk() succeeds unless:
  28.  
  29.      [ENOTDIR]     A component of the path prefix is not a directory.
  30.  
  31.      [ENAMETOOLONG]
  32.                    A component of a pathname exceeded {NAME_MAX} characters,
  33.                    or an entire path name exceeded {PATH_MAX} characters.
  34.  
  35.      [ENOENT]      The named file does not exist.
  36.  
  37.      [EACCES]      Search permission is denied for a component of the path
  38.                    prefix.
  39.  
  40.      [EACCES]      Write permission is denied on the directory containing the
  41.                    link to be removed.
  42.  
  43.      [ELOOP]       Too many symbolic links were encountered in translating the
  44.                    pathname.
  45.  
  46.      [EPERM]       The named file is a directory and the effective user ID of
  47.                    the process is not the super-user.
  48.  
  49.      [EPERM]       The directory containing the file is marked sticky, and
  50.                    neither the containing directory nor the file to be removed
  51.                    are owned by the effective user ID.
  52.  
  53.      [EBUSY]       The entry to be unlinked is the mount point for a mounted
  54.                    file system.
  55.  
  56.      [EIO]         An I/O error occurred while deleting the directory entry or
  57.                    deallocating the inode.
  58.  
  59.      [EROFS]       The named file resides on a read-only file system.
  60.  
  61.      [EFAULT]      _P_a_t_h points outside the process's allocated address space.
  62.  
  63. SSEEEE AALLSSOO
  64.      close(2),  link(2),  rmdir(2) symlink(7)
  65.  
  66. HHIISSTTOORRYY
  67.      An uunnlliinnkk() function call appeared in Version 6 AT&T UNIX.
  68.  
  69. 4th Berkeley Distribution        June 4, 1993                                2
  70.